package com.cxm.homework8.jdbcTmp.update;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("com/cxm/homework8/jdbcTmp/update/spring-config.xml");
        UserDao userDao = ac.getBean(UserDao.class);
        User user = new User();
        user.setUsername("JERRY");
        user.setPassword("123456");
        user.setBalance(5000);
        boolean reg = userDao.reg(user);
        System.out.println(reg);
    }
}
